home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / catD / TRYLOCK.z / TRYLOCK
Encoding:
Text File  |  2002-10-03  |  4.4 KB  |  132 lines

  1.  
  2.  
  3.  
  4. TTTTRRRRYYYYLLLLOOOOCCCCKKKK((((DDDD3333))))                                                        TTTTRRRRYYYYLLLLOOOOCCCCKKKK((((DDDD3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _TTTT_RRRR_YYYY_LLLL_OOOO_CCCC_KKKK - try to acquire a basic lock
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_>>>>
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_kkkk_ssss_yyyy_nnnn_cccc_hhhh_...._hhhh_>>>>
  14.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_dddd_dddd_iiii_...._hhhh_>>>>
  15.      _iiii_nnnn_tttt _TTTT_RRRR_YYYY_LLLL_OOOO_CCCC_KKKK_((((_llll_oooo_cccc_kkkk______tttt _****_l_o_c_k_p_,,,, _pppp_llll______tttt _p_l_))))_;;;;
  16.  
  17.    AAAArrrrgggguuuummmmeeeennnnttttssss
  18.      _l_o_c_k_p     Pointer to the basic lock to be acquired.
  19.  
  20.      _p_l        The interrupt priority level to be set while the lock is held
  21.                by the caller.
  22.  
  23. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  24.      If the lock specified by _l_o_c_k_p is immediately available (can be acquired
  25.      without waiting) _TTTT_RRRR_YYYY_LLLL_OOOO_CCCC_KKKK sets the interrupt priority level in accordance
  26.      with the value specified by _p_l and acquires the lock.  If the lock is not
  27.      immediately available, the function returns without acquiring the lock.
  28.  
  29.    RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeeessss
  30.      If the lock is acquired, _TTTT_RRRR_YYYY_LLLL_OOOO_CCCC_KKKK returns the previous interrupt priority
  31.      level for use by UNLOCK.  If the lock is not acquired the value _iiii_nnnn_vvvv_pppp_llll is
  32.      returned.
  33.  
  34. UUUUSSSSAAAAGGGGEEEE
  35.      Because some implementations require that interrupts that might attempt
  36.      to acquire the lock be blocked on the processor on which the lock is
  37.      held, portable drivers must specify a _p_l value that is sufficient to
  38.      block out any interrupt handler that might attempt to acquire this lock.
  39.      See the description of the _m_i_n__p_l argument to _LLLL_OOOO_CCCC_KKKK______AAAA_LLLL_LLLL_OOOO_CCCC(D3) for
  40.      additional discussion and a list of the valid values for _p_l.
  41.  
  42.      _TTTT_RRRR_YYYY_LLLL_OOOO_CCCC_KKKK may be used to acquire a lock in a different order from the order
  43.      defined by the lock hierarchy.
  44.  
  45.      When called from interrupt level, the _p_l argument must not specify a
  46.      priority level below the level at which the interrupt handler is running.
  47.  
  48.    LLLLeeeevvvveeeellll
  49.      Base or Interrupt.
  50.  
  51.    SSSSyyyynnnncccchhhhrrrroooonnnniiiizzzzaaaattttiiiioooonnnn CCCCoooonnnnssssttttrrrraaaaiiiinnnnttttssss
  52.      Does not sleep.
  53.  
  54.      Driver-defined basic locks, read/write locks, and sleep locks may be held
  55.      across calls to this function.
  56.  
  57.  
  58.  
  59.  
  60.  
  61.                                                                         PPPPaaaaggggeeee 1111
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68. TTTTRRRRYYYYLLLLOOOOCCCCKKKK((((DDDD3333))))                                                        TTTTRRRRYYYYLLLLOOOOCCCCKKKK((((DDDD3333))))
  69.  
  70.  
  71.  
  72. RRRREEEEFFFFEEEERRRREEEENNNNCCCCEEEESSSS
  73.      _LLLL_OOOO_CCCC_KKKK(D3), _LLLL_OOOO_CCCC_KKKK______AAAA_LLLL_LLLL_OOOO_CCCC(D3), _LLLL_OOOO_CCCC_KKKK______DDDD_EEEE_AAAA_LLLL_LLLL_OOOO_CCCC(D3), _UUUU_NNNN_LLLL_OOOO_CCCC_KKKK(D3)
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.                                                                         PPPPaaaaggggeeee 2222
  128.  
  129.  
  130.  
  131.